<%@ include file="/jsp/common/taglibs.jsp"%>
<html>
	<head>
	<script type="text/javascript">
		function cadastrar(){
			var frm = document.forms[0];
			frm.action = '<%= request.getContextPath()%>/gerenciarConta.do?task=inserirConta';
			frm.submit();
		}
		
		function voltar(){
			var frm = document.forms[0];
			frm.action = '<%= request.getContextPath()%>/gerenciarConta.do?task=unspecified';
			frm.submit();
		}
	</script>
	</head>
	<body>
		<html:form action="/gerenciarConta" >
				<table align="center">
				<logic:messagesPresent>
					<html:messages id="errors">
						<bean:write name="errors" filter="false"/>
						<br>
					</html:messages>
				</logic:messagesPresent>
				</table>
				<table align="center" class="bordatabela" width="400" cellspacing="0">
				<tr>
					<td colspan="2" class="fundoescuro" align="center"> 
						Cadastrar uma nova conta
					</td>
				</tr>
			</table>
			<table align="center" class="bordatabela" width="400">	
				<tr>
					<td class="fundobranco" >
						Nome:
					</td >
					<td class="fundobranco">
						<html:text name="gerenciarContaForm" styleClass="inputobrigatorio" size="62" property="contaVO.nome" maxlength="46"/>
					</td>
				</tr>
				<tr>
					<td class="fundoclaro" >
						Email:
					</td>
					<td class="fundoclaro">
						<html:text name="gerenciarContaForm" styleClass="inputobrigatorio" size="62"  property="contaVO.email" maxlength="46"/>
					</td>
				</tr>	
				<tr>
					<td class="fundobranco">
						Login:
					</td>
					<td class="fundobranco">
						<html:text name="gerenciarContaForm" styleClass="inputobrigatorio" size="40" property="contaVO.login" maxlength="30"/>
					</td>
				</tr>
				<tr>
					<td class="fundoclaro">
						Senha:
					</td>
					<td class="fundoclaro">
						<html:password name="gerenciarContaForm" styleClass="inputobrigatorio" size="25" property="contaVO.senha" maxlength="22"/>
					</td>
				</tr>
			</table>	
			<table align="center" border="0">	
				<tr>
					<td colspan="2" align="center" class="fundobranco">
						<input type="button" value="Cadastrar" class="botao" onclick="javascript: cadastrar();"/>
						<input type="reset" value="Limpar" class="botao"/>
						<input type="submit" value="Voltar" class="botao" onclick="javascript: voltar();"/>
					</td>
				</tr>
			</table>
		</html:form>
	</body>
</html>	